<%@ page contentType="text/html; charset=utf-8" %>
<%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="c_rt" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fmt_rt" uri="http://java.sun.com/jstl/fmt_rt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml"%>
<%@ taglib prefix="x_rt" uri="http://java.sun.com/jstl/xml_rt"%>
<%@ taglib prefix="wr_fn" uri="http://njo.org/taglib/functions"%>
<form name="f1" action="${pageContext.request.contextPath}/processor.deletemessage.tiles" method="post">
<table width="98%">
  <tr>
    <td class="left"><a name="title"><b>${wr_fn:message0(pageContext, 'admin.message.list.label.title')}</b></a></td>
    <td class="right"><a href="${pageContext.request.contextPath}/processor.prenewmessage.tiles">Import</a>
    <a href="${pageContext.request.contextPath}/processor.prenewmessage.tiles">Export</a>
    <a href="${pageContext.request.contextPath}/processor.prenewmessage.tiles">${wr_fn:message0(pageContext, 'admin.message.list.action.prenew')}</a> <a href="javascript:document.f1.submit();">${wr_fn:message0(pageContext, 'admin.message.list.action.del')}</a></td>
  </tr>
</table>
<c:set var="actionMessages" value="${wr_fn:amessages(pageContext, '')}"/>
<c:forEach items="${actionMessages}" var="item">
    <div class="error-content">${wr_fn:message(pageContext, item.key, item.values)}</div>
</c:forEach>
<table class="forum" width="98%">
<col width="10"/>
<col width="150"/>
<col width="*"/>
<tbody>
  <tr>
    <th>&nbsp;</th>
    <th>${wr_fn:message0(pageContext, 'admin.message.common.label.messageKey')}</th>
    <th>${wr_fn:message0(pageContext, 'admin.message.common.label.description')}</th>
  </tr>
<c:forEach items="${messageList}" var="item" varStatus="itemStatus">
  <tr class="${(itemStatus.index%2==0) ? 'even' : 'odd'}">
    <td><input type="checkbox" name="messageKey" value="${item[0]}"/></td>
    <td><a href="${pageContext.request.contextPath}/processor.loadmessage.tiles?messageKey=${item[0]}">${item[0]}</a></td>
    <td><p class="description">${item[1]}</p></td>
  </tr>
</c:forEach>
</tbody>
</table>
</form>